package com.ea.eadp.nexus.test.pageDefinition.originX;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

import com.ea.eadp.nexus.test.common.PageOperation;
import com.ea.eadp.nexus.test.pageDefinition.BasePage;

public class UpdateEmailPage extends BasePage {

    public UpdateEmailPage(final WebDriver driver) {
        super(driver, UpdateEmailPage.class);
    }

    public void waitPageLoadCompleted() {
        PageOperation.WebDriverWait(driver, "emailUpdate");
    }

    public void inputEmail(final String email) {
        PageOperation.SendKeyToElementAfterWait(driver, "newEmail", email);
    }

    public void clickUpdateButton() {
        driver.findElement(By.id("updateBtn")).click();
    }

    public void clickContinueButton() {
        PageOperation.WebDriverWait(driver, "continueBtn");
        driver.findElement(By.id("continueBtn")).click();
    }
}
